<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/static/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<style type="text/css">
	/*body{background:#eee;}*/
	li{width:100%;padding-bottom:20px;position:relative;}
	.thumbimg{width:200px;margin:0 10%;text-align:center;background-color:#eee;}
	.bgc:hover{position:absolute;width:200px;height:90%;top:0;left:0;background:rgba(0,0,0,0.6);margin:0 14%;}
	.thumbimg img{height:100px;}
	.thumbimg div{padding-top:10px;padding-bottom:15px;background:#183652;}
	.thumbimg div p{color:#fff;font-size:18px;margin-bottom:0;}
	.btn0{background: none;color:red;border: 1px solid red;border-radius:3px;padding:2px 5px;cursor:pointer;}
	.btn1{background: #429842;color:#fff;border: 1px solid #429842;border-radius:3px;padding:2px 5px;}
	.btn2{background: none;color:red;border: 1px solid red;border-radius:3px;padding:2px 5px;text-decoration:line-through;cursor:pointer;}
	/*.btn2{background: none;color:#ccc;border: 1px solid #ccc;border-radius:3px;padding:2px 5px;}*/
</style>
<title>插件应用</title>
<meta name="keywords" content="H-ui.admin v3.1,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description" content="H-ui.admin v3.1，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>插件管理<span class="c-gray en">&gt;</span> 插件应用 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<article class="page-container">
	<div class="row">
        <ul>
            {foreach $list as $key=>$value }
            <li class="col-lg-2 col-md-3 col-sm-4 col-xs-6">
                <div class="thumbimg">
                    <img src="{$value.icon}">
                    <div>
                    	<p>{$value.title}</p>
                    	{if $value.buy_state==0}
                    	<button onclick="topay(this,{$value.id})" class="btn0">立即购买</button>
                    	{elseif $value.buy_state==2}
                    	<button class="btn2">待确认</button>
                    	{elseif $value.buy_state==1}
                    	<button class="btn1">已购买</button>
                    	{/if}
                    </div>
                </div>
                <div class="bgc"></div>
            </li>
            {/foreach}
        </ul>
    </div>
</article>

<!--_footer 作为公共模版分离出去--> 
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">

function topay(obj,id){
	layer.confirm('确认购买？',function(index){
		$.ajax({
			type: 'POST',
			url: 'topay',
			data:{id:id},
			success: function(data){
				if(data.code==200){
					layer.msg('下单成功!',{icon:1,time:3000});
					setTimeout("location.reload()",3000);
				}else{
					layer.msg(data.msg,{icon:2,time:3000});
				}
			},
			error:function(data) {
				layer.msg('下单失败!',{icon:2,time:3000});
			},
		});		
	});
}
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>